package cn.linkstudy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.linkstudy.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户Mapper接口
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据手机号查询用户
     */
    User selectByPhone(@Param("phone") String phone);

    /**
     * 根据用户名查询用户
     */
    User selectByUsername(@Param("username") String username);

    int updateAvatarColor(@Param("userId") Long userId, @Param("avatarColor") String avatarColor);
}